//
//  ScxqVC+UI.swift
//  Auscultation
//
//  Created by 来 on 2020/12/22.
//

import Foundation

extension ScxqVC {
    
    func initUI() {
        let top_view = UIImageView.init(image: #imageLiteral(resourceName: "beijing3@1.5x"))
        top_view.isUserInteractionEnabled = true
        view.addSubview(top_view)
        top_view.snp.makeConstraints { (make) in
            make.top.left.right.equalToSuperview()
            make.height.equalTo(UIDevice.lgf_NavBarH())
        }
        self.navTitle = "筛查详情"
        self.rightText = "查看结果"
        self.lgf_NavigationBar.style.lgf_TitleColor = UIColor.white
        self.lgf_NavigationBar.style.lgf_RightBtnTitleColor = UIColor.white
        self.lgf_NavigationBar.lgf_line?.isHidden = false
        self.lgf_NavigationBar.lgf_Reload()
        
        scrollView = UIScrollView.lgf_Table("F1F2F4")
        if #available(iOS 11.0, *) {
            scrollView.contentInsetAdjustmentBehavior = .never
        } else {
            self.automaticallyAdjustsScrollViewInsets = false
        }
        view.addSubview(scrollView)
        scrollView.snp.makeConstraints { (make) in
            make.top.equalTo(top_view.snp.bottom)
            make.left.right.bottom.equalToSuperview()
        }
        
        tzzx = UILabel.init()
        tzzx.text = "听诊中心"
        tzzx.font = UIFont.boldSystemFont(ofSize: 15)
        scrollView.addSubview(tzzx)
        tzzx.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.width.equalToSuperview().offset(-120)
            make.centerX.equalToSuperview().offset(-50)
            make.height.equalTo(55)
        }
        
        let tzzxxq = UILabel.init()
        tzzxxq.text = "查看详情 >"
        tzzxxq.textAlignment = .right
        tzzxxq.font = UIFont.systemFont(ofSize: 12)
        tzzxxq.textColor = UIColor.init(lgf_HexString: "0F88F2")
        scrollView.addSubview(tzzxxq)
        tzzxxq.snp.makeConstraints { (make) in
            make.centerY.equalTo(tzzx)
            make.width.equalToSuperview().offset(-36)
            make.centerX.equalToSuperview()
        }
        
        let ph_back = UIView.init()
        scrollView.addSubview(ph_back)
        ph_back.snp.makeConstraints { (make) in
            make.top.equalTo(tzzx.snp.bottom)
            make.width.equalToSuperview()
            make.centerX.equalToSuperview()
            make.height.equalTo(170)
        }
        
        ph_view = UIScrollView.init()
        ph_view.showsHorizontalScrollIndicator = false
        ph_view.bounces = false
        ph_view.delegate = self
        ph_back.addSubview(ph_view)
        ph_view.snp.makeConstraints { (make) in
            make.left.top.bottom.equalToSuperview()
            make.right.equalToSuperview().offset(-20)
        }
        
        ph_view_i = UIImageView.init(image: nil)
        ph_view_i.backgroundColor = UIColor.black
        ph_view_i.isUserInteractionEnabled = true
        ph_view.addSubview(ph_view_i)
        ph_view_i.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.centerY.equalToSuperview()
            make.height.equalToSuperview()
            make.width.equalTo((170 * 30720 / 350))
        }
        
        ph_r = bzxV.init()
        ph_r.font = UIFont.systemFont(ofSize: 8)
        ph_r.textAlignment = .center
        ph_r.textColor = UIColor.white
        ph_back.addSubview(ph_r)
        ph_r.snp.makeConstraints { (make) in
            make.top.bottom.right.equalToSuperview()
            make.width.equalTo(20)
        }
        ph_r.bzxList = ["0", "dB", "-4", "-8", "-12", "-16", "-20", "-24", "-28", "-32", "-36", "-40", "-44", "-48", "-52", "-56", "-60", "-64"]
        DispatchQueue.main.async {
            let colors = [UIColor.red.cgColor, UIColor.yellow.cgColor, UIColor.green.cgColor, UIColor.blue.cgColor];
            let gradient = CAGradientLayer.init();
            gradient.startPoint = CGPoint.init(x: 0.5, y: 0)
            gradient.endPoint = CGPoint.init(x: 0.5, y: 1)
            gradient.colors = colors;
            gradient.frame = self.ph_r.bounds;
            self.ph_r.layer.insertSublayer(gradient, at: 0)
        }
        
        
        let play_view = UIView.init()
        play_view.backgroundColor = UIColor.white
        scrollView.addSubview(play_view)
        play_view.snp.makeConstraints { (make) in
            make.top.equalTo(ph_back.snp.bottom)
            make.width.equalToSuperview()
            make.centerX.equalToSuperview()
            make.height.equalTo(60)
        }
        
        play_button = UIButton.init(type: .custom)
        play_button.setBackgroundImage(#imageLiteral(resourceName: "bofang"), for: .normal)
        play_button.addTarget(self, action: #selector(ScxqVC.playNow(_:)), for: .touchUpInside)
        play_view.addSubview(play_button)
        play_button.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(17)
            make.top.equalToSuperview().offset(12)
            make.height.width.equalTo(25)
        }
        
        play_line = UISlider.init()
        play_line.minimumValue = 0//最小值
        play_line.maximumValue = 1//最大值
        play_line.value = 0 //当前值
        play_line.minimumTrackTintColor = UIColor.init(lgf_HexString: "0F88F2")
        play_line.maximumTrackTintColor = UIColor.init(lgf_HexString: "CFD4D9")
        play_line.thumbTintColor = UIColor.init(lgf_HexString: "0F88F2")
        let thumbImage = #imageLiteral(resourceName: "play_i")
        UIGraphicsBeginImageContextWithOptions(CGSize.init(width: 15, height: 15), false, 0.0)
        thumbImage.draw(in: CGRect.init(x: 0, y: 0, w: 15, h: 15))
        let newThumbImage = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        play_line.setThumbImage(newThumbImage, for: .normal)
        play_line.setThumbImage(newThumbImage, for: .selected)
        play_line.setThumbImage(newThumbImage, for: .highlighted)
        play_line.setThumbImage(newThumbImage, for: .focused)
        play_line.addTarget(self, action: #selector(BdjlxqVC.s_end(_:)), for: .touchUpInside)
        play_line.addTarget(self, action: #selector(BdjlxqVC.s_changed(_:)), for: .valueChanged)
        play_line.lgf_AddTap(target: self, action: #selector(BdjlxqVC.s_tap(_:)))
        play_view.addSubview(play_line)
        play_line.snp.makeConstraints { (make) in
            make.right.equalToSuperview().offset(-17)
            make.left.equalTo(play_button.snp.right).offset(15)
            make.height.equalTo(30)
            make.centerY.equalTo(play_button)
        }
        
        play_time = UILabel.init()
        play_time.text = "/00:00"
        play_time.textColor = UIColor.init(lgf_HexString: "8D969D")
        play_time.font = UIFont.systemFont(ofSize: 13)
        play_view.addSubview(play_time)
        play_time.snp.makeConstraints { (make) in
            make.right.equalTo(play_line)
            make.top.equalTo(play_line.snp.bottom).offset(-8)
            make.height.equalTo(20)
        }
        
        play_time_all = UILabel.init()
        play_time_all.text = "00:00"
        play_time_all.textColor = UIColor.init(lgf_HexString: "4E7EA9")
        play_time_all.font = UIFont.systemFont(ofSize: 13)
        play_view.addSubview(play_time_all)
        play_time_all.snp.makeConstraints { (make) in
            make.right.equalTo(play_time.snp.left)
            make.centerY.equalTo(play_time)
        }
        
        let hzxi_l = UILabel.init()
        hzxi_l.text = "患者信息"
        hzxi_l.font = UIFont.boldSystemFont(ofSize: 16)
        hzxi_l.textColor = UIColor.init(lgf_HexString: "222222")
        scrollView.addSubview(hzxi_l)
        hzxi_l.snp.makeConstraints { (make) in
            make.top.equalTo(play_view.snp.bottom).offset(25)
            make.width.equalToSuperview().offset(-36)
            make.centerX.equalToSuperview()
        }
        
        hzxi_v = UIView.init()
        hzxi_v.clipsToBounds = true
        hzxi_v.backgroundColor = UIColor.white
        hzxi_v.layer.cornerRadius = 4
        scrollView.addSubview(hzxi_v)
        hzxi_v.snp.makeConstraints { (make) in
            make.top.equalTo(hzxi_l.snp.bottom).offset(15)
            make.width.equalToSuperview().offset(-34)
            make.centerX.equalToSuperview()
            make.height.equalTo(100)
        }
        
        hzxm = UILabel.init()
        hzxm.font = UIFont.systemFont(ofSize: 12)
        hzxm.textColor = UIColor.init(lgf_HexString: "8D969D")
        hzxm.text = "患者姓名："
        hzxi_v.addSubview(hzxm)
        hzxm.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        jhzxm = UILabel.init()
        jhzxm.font = UIFont.systemFont(ofSize: 12)
        jhzxm.textColor = UIColor.init(lgf_HexString: "8D969D")
        jhzxm.text = "监护者姓名："
        hzxi_v.addSubview(jhzxm)
        jhzxm.snp.makeConstraints { (make) in
            make.top.equalTo(hzxm.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        csrq = UILabel.init()
        csrq.font = UIFont.systemFont(ofSize: 12)
        csrq.textColor = UIColor.init(lgf_HexString: "8D969D")
        csrq.text = "出生日期："
        hzxi_v.addSubview(csrq)
        csrq.snp.makeConstraints { (make) in
            make.top.equalTo(jhzxm.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        xb = UILabel.init()
        xb.font = UIFont.systemFont(ofSize: 12)
        xb.textColor = UIColor.init(lgf_HexString: "8D969D")
        xb.text = "性别："
        hzxi_v.addSubview(xb)
        xb.snp.makeConstraints { (make) in
            make.top.equalTo(csrq.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        mzh = UILabel.init()
        mzh.font = UIFont.systemFont(ofSize: 12)
        mzh.textColor = UIColor.init(lgf_HexString: "8D969D")
        mzh.text = "门诊号："
        hzxi_v.addSubview(mzh)
        mzh.snp.makeConstraints { (make) in
            make.top.equalTo(xb.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        ybh = UILabel.init()
        ybh.font = UIFont.systemFont(ofSize: 12)
        ybh.textColor = UIColor.init(lgf_HexString: "8D969D")
        ybh.text = "医保号："
        hzxi_v.addSubview(ybh)
        ybh.snp.makeConstraints { (make) in
            make.top.equalTo(mzh.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        sfzh = UILabel.init()
        sfzh.font = UIFont.systemFont(ofSize: 12)
        sfzh.textColor = UIColor.init(lgf_HexString: "8D969D")
        sfzh.text = "身份证号："
        hzxi_v.addSubview(sfzh)
        sfzh.snp.makeConstraints { (make) in
            make.top.equalTo(ybh.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        sjh = UILabel.init()
        sjh.font = UIFont.systemFont(ofSize: 12)
        sjh.textColor = UIColor.init(lgf_HexString: "8D969D")
        sjh.text = "手机号："
        hzxi_v.addSubview(sjh)
        sjh.snp.makeConstraints { (make) in
            make.top.equalTo(sfzh.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        lxdz = UILabel.init()
        lxdz.font = UIFont.systemFont(ofSize: 12)
        lxdz.textColor = UIColor.init(lgf_HexString: "8D969D")
        lxdz.text = "联系地址："
        hzxi_v.addSubview(lxdz)
        lxdz.snp.makeConstraints { (make) in
            make.top.equalTo(sjh.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        sg = UILabel.init()
        sg.font = UIFont.systemFont(ofSize: 12)
        sg.textColor = UIColor.init(lgf_HexString: "8D969D")
        sg.text = "身高："
        hzxi_v.addSubview(sg)
        sg.snp.makeConstraints { (make) in
            make.top.equalTo(lxdz.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        tz = UILabel.init()
        tz.font = UIFont.systemFont(ofSize: 12)
        tz.textColor = UIColor.init(lgf_HexString: "8D969D")
        tz.text = "体重："
        hzxi_v.addSubview(tz)
        tz.snp.makeConstraints { (make) in
            make.top.equalTo(sg.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        sfzj = UILabel.init()
        sfzj.font = UIFont.systemFont(ofSize: 12)
        sfzj.textColor = UIColor.init(lgf_HexString: "8D969D")
        sfzj.text = "是否镇静："
        hzxi_v.addSubview(sfzj)
        sfzj.snp.makeConstraints { (make) in
            make.top.equalTo(tz.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        tw = UILabel.init()
        tw.font = UIFont.systemFont(ofSize: 12)
        tw.textColor = UIColor.init(lgf_HexString: "8D969D")
        tw.text = "体位："
        hzxi_v.addSubview(tw)
        tw.snp.makeConstraints { (make) in
            make.top.equalTo(sfzj.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        phcd = UILabel.init()
        phcd.font = UIFont.systemFont(ofSize: 12)
        phcd.textColor = UIColor.init(lgf_HexString: "8D969D")
        phcd.text = "配合程度："
        hzxi_v.addSubview(phcd)
        phcd.snp.makeConstraints { (make) in
            make.top.equalTo(tw.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        xycjcs = UILabel.init()
        xycjcs.font = UIFont.systemFont(ofSize: 12)
        xycjcs.textColor = UIColor.init(lgf_HexString: "8D969D")
        xycjcs.text = "心音采集场所："
        hzxi_v.addSubview(xycjcs)
        xycjcs.snp.makeConstraints { (make) in
            make.top.equalTo(phcd.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        sfss = UILabel.init()
        sfss.font = UIFont.systemFont(ofSize: 12)
        sfss.textColor = UIColor.init(lgf_HexString: "8D969D")
        sfss.text = "是否手术："
        hzxi_v.addSubview(sfss)
        sfss.snp.makeConstraints { (make) in
            make.top.equalTo(xycjcs.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        lczdxx = UILabel.init()
        lczdxx.font = UIFont.systemFont(ofSize: 12)
        lczdxx.textColor = UIColor.init(lgf_HexString: "8D969D")
        lczdxx.text = "临床诊断信息："
        hzxi_v.addSubview(lczdxx)
        lczdxx.snp.makeConstraints { (make) in
            make.top.equalTo(sfss.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        bz = UILabel.init()
        bz.font = UIFont.systemFont(ofSize: 12)
        bz.textColor = UIColor.init(lgf_HexString: "8D969D")
        bz.text = "备注："
        hzxi_v.addSubview(bz)
        bz.snp.makeConstraints { (make) in
            make.top.equalTo(lczdxx.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(11)
            make.width.equalToSuperview().offset(-20)
        }
        
        let ckgd = UILabel.init()
        ckgd.isUserInteractionEnabled = true
        ckgd.clipsToBounds = true
        ckgd.textAlignment = .center
        ckgd.text = "更多信息"
        ckgd.lgf_ViewName = "收拢"
        ckgd.textColor = UIColor.init(lgf_HexString: "0F88F2")
        ckgd.font = UIFont.systemFont(ofSize: 13)
        ckgd.lgf_AddTap(target: self, action: #selector(ScxqVC.s_ckgd(_:)))
        hzxi_v.addSubview(ckgd)
        ckgd.snp.makeConstraints { (make) in
            make.right.equalToSuperview().offset(-15)
            make.bottom.equalToSuperview().offset(-5)
            make.width.equalTo(80)
            make.height.equalTo(30)
        }
        let ckgd_i = UIImageView.init(image: #imageLiteral(resourceName: "下拉"))
        hzxi_v.addSubview(ckgd_i)
        ckgd_i.snp.makeConstraints { (make) in
            make.right.equalTo(ckgd)
            make.centerY.equalTo(ckgd)
            make.width.equalTo(8)
            make.height.equalTo(5)
        }
        
        let fzscck_l = UILabel.init()
        fzscck_l.text = "AI辅助筛查参考"
        fzscck_l.font = UIFont.boldSystemFont(ofSize: 16)
        fzscck_l.textColor = UIColor.init(lgf_HexString: "222222")
        scrollView.addSubview(fzscck_l)
        fzscck_l.snp.makeConstraints { (make) in
            make.top.equalTo(hzxi_v.snp.bottom).offset(25)
            make.width.equalToSuperview().offset(-36)
            make.centerX.equalToSuperview()
        }
        
        fzscck_v = UIView.init()
        fzscck_v.clipsToBounds = true
        fzscck_v.backgroundColor = UIColor.white
        fzscck_v.layer.cornerRadius = 4
        scrollView.addSubview(fzscck_v)
        fzscck_v.snp.makeConstraints { (make) in
            make.top.equalTo(fzscck_l.snp.bottom).offset(15)
            make.width.equalToSuperview().offset(-34)
            make.centerX.equalToSuperview()
            make.height.equalTo(350)
        }
        
        let ybycgl_v = UIView.init()
        ybycgl_v.layer.cornerRadius = 4
        ybycgl_v.backgroundColor = UIColor.init(lgf_HexString: "FBF1FF")
        fzscck_v.addSubview(ybycgl_v)
        ybycgl_v.snp.makeConstraints { (make) in
            make.top.equalTo(15)
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.height.equalTo(50)
        }
        
        let ybycgl_i = UIImageView.init(image: #imageLiteral(resourceName: "概率icon"))
        ybycgl_v.addSubview(ybycgl_i)
        ybycgl_i.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(15)
            make.centerY.equalToSuperview()
            make.width.equalTo(38)
            make.height.equalTo(30)
        }
        
        let ybycgl_l = UILabel.init()
        ybycgl_l.text = "样本异常概率"
        ybycgl_l.font = UIFont.boldSystemFont(ofSize: 12)
        ybycgl_l.textColor = UIColor.init(lgf_HexString: "8D969D")
        ybycgl_v.addSubview(ybycgl_l)
        ybycgl_l.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.left.equalTo(ybycgl_i.snp.right).offset(12)
        }
        
        ybycgl_n = UILabel.init()
        ybycgl_n.text = ""
        ybycgl_n.font = UIFont.boldSystemFont(ofSize: 20)
        ybycgl_n.textColor = UIColor.init(lgf_HexString: "222222")
        ybycgl_v.addSubview(ybycgl_n)
        ybycgl_n.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(-20)
        }
        
        bzxfgl = UILabel.init()
        bzxfgl.text = "病种细分概率"
        bzxfgl.font = UIFont.boldSystemFont(ofSize: 15)
        bzxfgl.textColor = UIColor.init(lgf_HexString: "8D969D")
        fzscck_v.addSubview(bzxfgl)
        bzxfgl.snp.makeConstraints { (make) in
            make.top.equalTo(ybycgl_v.snp.bottom).offset(25)
            make.width.equalToSuperview().offset(-36)
            make.centerX.equalToSuperview()
        }
        
        let vsd = UILabel.init()
        vsd.text = "VSD"
        vsd.font = UIFont.systemFont(ofSize: 12)
        vsd.textColor = UIColor.init(lgf_HexString: "8D969D")
        vsd.textAlignment = .right
        fzscck_v.addSubview(vsd)
        vsd.snp.makeConstraints { (make) in
            make.top.equalTo(bzxfgl.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(30)
            make.width.equalTo(30)
        }
        
        let asd = UILabel.init()
        asd.text = "ASD"
        asd.font = UIFont.systemFont(ofSize: 12)
        asd.textColor = UIColor.init(lgf_HexString: "8D969D")
        asd.textAlignment = .right
        fzscck_v.addSubview(asd)
        asd.snp.makeConstraints { (make) in
            make.top.equalTo(vsd.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(30)
            make.width.equalTo(30)
        }
        
        let pda = UILabel.init()
        pda.text = "PDA"
        pda.font = UIFont.systemFont(ofSize: 12)
        pda.textColor = UIColor.init(lgf_HexString: "8D969D")
        pda.textAlignment = .right
        fzscck_v.addSubview(pda)
        pda.snp.makeConstraints { (make) in
            make.top.equalTo(asd.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(30)
            make.width.equalTo(30)
        }
        
        let ps = UILabel.init()
        ps.text = "PS"
        ps.font = UIFont.systemFont(ofSize: 12)
        ps.textColor = UIColor.init(lgf_HexString: "8D969D")
        ps.textAlignment = .right
        fzscck_v.addSubview(ps)
        ps.snp.makeConstraints { (make) in
            make.top.equalTo(pda.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(30)
            make.width.equalTo(30)
        }
        
        let tof = UILabel.init()
        tof.text = "TOF"
        tof.font = UIFont.systemFont(ofSize: 12)
        tof.textColor = UIColor.init(lgf_HexString: "8D969D")
        tof.textAlignment = .right
        fzscck_v.addSubview(tof)
        tof.snp.makeConstraints { (make) in
            make.top.equalTo(ps.snp.bottom).offset(14)
            make.left.equalToSuperview().offset(30)
            make.width.equalTo(30)
        }
        
        let bzxfgl_c = UIView.init()
        bzxfgl_c.clipsToBounds = true
        fzscck_v.addSubview(bzxfgl_c)
        bzxfgl_c.snp.makeConstraints { (make) in
            make.top.equalTo(vsd.snp.top)
            make.bottom.equalTo(tof.snp.bottom)
            make.left.equalTo(vsd.snp.right).offset(10)
            make.right.equalToSuperview().offset(-52)
        }
        
        vsd_c = UIView.init()
        vsd_c.layer.cornerRadius = 6
        vsd_c.backgroundColor = UIColor.init(lgf_HexString: "4772FF")
        bzxfgl_c.addSubview(vsd_c)
        vsd_c.snp.makeConstraints { (make) in
            make.centerY.equalTo(vsd)
            make.left.equalToSuperview().offset(-6)
            make.height.equalTo(12)
            make.width.equalTo((UIDevice.lgf_ScreenW - 156) * 0 + 6)
        }
        
        asd_c = UIView.init()
        asd_c.layer.cornerRadius = 6
        asd_c.backgroundColor = UIColor.init(lgf_HexString: "4772FF")
        bzxfgl_c.addSubview(asd_c)
        asd_c.snp.makeConstraints { (make) in 
            make.centerY.equalTo(asd)
            make.left.equalToSuperview().offset(-6)
            make.height.equalTo(12)
            make.width.equalTo((UIDevice.lgf_ScreenW - 156) * 0 + 6)
        }
        
        pda_c = UIView.init()
        pda_c.layer.cornerRadius = 6
        pda_c.backgroundColor = UIColor.init(lgf_HexString: "4772FF")
        bzxfgl_c.addSubview(pda_c)
        pda_c.snp.makeConstraints { (make) in
            make.centerY.equalTo(pda)
            make.left.equalToSuperview().offset(-6)
            make.height.equalTo(12)
            make.width.equalTo((UIDevice.lgf_ScreenW - 156) * 0 + 6)
        }
        
        ps_c = UIView.init()
        ps_c.layer.cornerRadius = 6
        ps_c.backgroundColor = UIColor.init(lgf_HexString: "4772FF")
        bzxfgl_c.addSubview(ps_c)
        ps_c.snp.makeConstraints { (make) in
            make.centerY.equalTo(ps)
            make.left.equalToSuperview().offset(-6)
            make.height.equalTo(12)
            make.width.equalTo((UIDevice.lgf_ScreenW - 156) * 0 + 6)
        }
        
        tof_c = UIView.init()
        tof_c.layer.cornerRadius = 6
        tof_c.backgroundColor = UIColor.init(lgf_HexString: "4772FF")
        bzxfgl_c.addSubview(tof_c)
        tof_c.snp.makeConstraints { (make) in
            make.centerY.equalTo(tof)
            make.left.equalToSuperview().offset(-6)
            make.height.equalTo(12)
            make.width.equalTo((UIDevice.lgf_ScreenW - 156) * 0 + 6)
        }
        
        vsd_n = UILabel.init()
        vsd_n.text = "0%"
        vsd_n.textColor = UIColor.init(lgf_HexString: "4374DA")
        vsd_n.font = UIFont.systemFont(ofSize: 12)
        fzscck_v.addSubview(vsd_n)
        vsd_n.snp.makeConstraints { (make) in
            make.centerY.equalTo(vsd)
            make.left.equalTo(bzxfgl_c.snp.right)
        }
        
        asd_n = UILabel.init()
        asd_n.text = "0%"
        asd_n.textColor = UIColor.init(lgf_HexString: "4374DA")
        asd_n.font = UIFont.systemFont(ofSize: 12)
        fzscck_v.addSubview(asd_n)
        asd_n.snp.makeConstraints { (make) in
            make.centerY.equalTo(asd)
            make.left.equalTo(bzxfgl_c.snp.right)
        }
        
        pda_n = UILabel.init()
        pda_n.text = "0%"
        pda_n.textColor = UIColor.init(lgf_HexString: "4374DA")
        pda_n.font = UIFont.systemFont(ofSize: 12)
        fzscck_v.addSubview(pda_n)
        pda_n.snp.makeConstraints { (make) in
            make.centerY.equalTo(pda)
            make.left.equalTo(bzxfgl_c.snp.right)
        }
        
        ps_n = UILabel.init()
        ps_n.text = "0%"
        ps_n.textColor = UIColor.init(lgf_HexString: "4374DA")
        ps_n.font = UIFont.systemFont(ofSize: 12)
        fzscck_v.addSubview(ps_n)
        ps_n.snp.makeConstraints { (make) in
            make.centerY.equalTo(ps)
            make.left.equalTo(bzxfgl_c.snp.right)
        }
        
        tof_n = UILabel.init()
        tof_n.text = "0%"
        tof_n.textColor = UIColor.init(lgf_HexString: "4374DA")
        tof_n.font = UIFont.systemFont(ofSize: 12)
        fzscck_v.addSubview(tof_n)
        tof_n.snp.makeConstraints { (make) in
            make.centerY.equalTo(tof)
            make.left.equalTo(bzxfgl_c.snp.right)
        }
        
        fzscck_error = UIView.init()
        fzscck_error.isHidden = true
        fzscck_error.layer.cornerRadius = 4
        fzscck_error.backgroundColor = UIColor.white
        scrollView.addSubview(fzscck_error)
        fzscck_error.snp.makeConstraints { (make) in
            make.top.equalTo(fzscck_l.snp.bottom).offset(15)
            make.width.equalToSuperview().offset(-34)
            make.centerX.equalToSuperview()
            make.height.equalTo(350)
        }
        
        let fzscck_error_i = UIImageView.init(image: #imageLiteral(resourceName: "失败"))
        fzscck_error.addSubview(fzscck_error_i)
        fzscck_error_i.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().offset(-20)
        }
        
        let fzscck_error_l = UILabel.init()
        fzscck_error_l.text = "无法解析"
        fzscck_error_l.font = UIFont.boldSystemFont(ofSize: 14)
        fzscck_error_l.textColor = UIColor.init(lgf_HexString: "8D969D")
        fzscck_error.addSubview(fzscck_error_l)
        fzscck_error_l.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().offset(20)
        }
        
        fzscck_fxz = UIView.init()
        fzscck_fxz.isHidden = true
        fzscck_fxz.layer.cornerRadius = 4
        fzscck_fxz.backgroundColor = UIColor.white
        scrollView.addSubview(fzscck_fxz)
        fzscck_fxz.snp.makeConstraints { (make) in
            make.top.equalTo(fzscck_l.snp.bottom).offset(15)
            make.width.equalToSuperview().offset(-34)
            make.centerX.equalToSuperview()
            make.height.equalTo(350)
        }
        
        let filePath = Bundle.main.path(forResource: "fxz.gif", ofType: nil)!
        let data = try! Data.init(contentsOf: URL.init(fileURLWithPath: filePath))
        let image = UIImage.sd_image(withGIFData: data)
        let fzscck_fxz_i = UIImageView.init(image: image)
        fzscck_fxz_i.transform = CGAffineTransform.init(scaleX: 0.5, y: 0.5)
        fzscck_fxz.addSubview(fzscck_fxz_i)
        fzscck_fxz_i.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().offset(-20)
        }
        
        let fzscck_fxz_l = UILabel.init()
        fzscck_fxz_l.text = "分析中..."
        fzscck_fxz_l.font = UIFont.boldSystemFont(ofSize: 14)
        fzscck_fxz_l.textColor = UIColor.init(lgf_HexString: "8D969D")
        fzscck_fxz.addSubview(fzscck_fxz_l)
        fzscck_fxz_l.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().offset(20)
        }
        
        let ycqy = UILabel.init()
        ycqy.text = "异常区域"
        ycqy.font = UIFont.boldSystemFont(ofSize: 15)
        ycqy.textColor = UIColor.init(lgf_HexString: "8D969D")
        fzscck_v.addSubview(ycqy)
        ycqy.snp.makeConstraints { (make) in
            make.top.equalTo(bzxfgl_c.snp.bottom).offset(25)
            make.width.equalToSuperview().offset(-36)
            make.centerX.equalToSuperview()
        }
        
        let ycqy_i = UIImageView.init(image: #imageLiteral(resourceName: "异常"))
        fzscck_v.addSubview(ycqy_i)
        ycqy_i.snp.makeConstraints { (make) in
            make.top.equalTo(ycqy.snp.bottom).offset(13)
            make.left.equalTo(ycqy)
            make.width.height.equalTo(20)
        }
        
        ycqy_l = UILabel.init()
        ycqy_l.text = "显示异常文字说明内容，显示异常文字说明内显示异常文字说明内容，显示异常文字说明内显示异常文字说明内容，显示异常文字说明内"
        ycqy_l.numberOfLines = 2
        ycqy_l.textColor = UIColor.init(lgf_HexString: "A0744B")
        ycqy_l.font = UIFont.systemFont(ofSize: 12)
        fzscck_v.addSubview(ycqy_l)
        ycqy_l.snp.makeConstraints { (make) in
            make.left.equalTo(ycqy_i.snp.right).offset(10)
            make.centerY.equalTo(ycqy_i)
            make.right.equalToSuperview().offset(-15)
            make.height.equalTo(30)
        }
        
        let zzysscjl_sv = UIView.init()
        scrollView.addSubview(zzysscjl_sv)
        zzysscjl_sv.snp.makeConstraints { (make) in
            make.top.equalTo(fzscck_v.snp.bottom).offset(25)
            make.width.equalToSuperview()
            make.centerX.equalToSuperview()
            make.height.equalTo(150)
        }
        
        let zzysscjl_l = UILabel.init()
        zzysscjl_l.text = "主诊医生筛查结论"
        zzysscjl_l.font = UIFont.boldSystemFont(ofSize: 16)
        zzysscjl_l.textColor = UIColor.init(lgf_HexString: "222222")
        zzysscjl_sv.addSubview(zzysscjl_l)
        zzysscjl_l.snp.makeConstraints { (make) in
            make.top.equalToSuperview()
            make.width.equalToSuperview().offset(-36)
            make.centerX.equalToSuperview()
        }
        
        let zzysscjl_v = UIView.init()
        zzysscjl_v.clipsToBounds = true
        zzysscjl_v.backgroundColor = UIColor.white
        zzysscjl_v.layer.cornerRadius = 4
        zzysscjl_sv.addSubview(zzysscjl_v)
        zzysscjl_v.snp.makeConstraints { (make) in
            make.top.equalTo(zzysscjl_l.snp.bottom).offset(15)
            make.width.equalToSuperview().offset(-34)
            make.centerX.equalToSuperview()
            make.height.equalTo(110)
        }
        
        let ypqk_l = UILabel.init()
        ypqk_l.text = "样品情况："
        ypqk_l.textColor = UIColor.init(lgf_HexString: "8D969D")
        ypqk_l.font = UIFont.systemFont(ofSize: 12)
        zzysscjl_v.addSubview(ypqk_l)
        ypqk_l.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(15)
            make.left.equalToSuperview().offset(10)
        }
        
        ypqk = UILabel.init()
        ypqk.text = ""
        ypqk.textColor = UIColor.init(lgf_HexString: "4374DA")
        ypqk.font = UIFont.systemFont(ofSize: 12)
        zzysscjl_v.addSubview(ypqk)
        ypqk.snp.makeConstraints { (make) in
            make.centerY.equalTo(ypqk_l)
            make.left.equalTo(ypqk_l.snp.right)
        }
        
        ypbz = UILabel.init()
        ypbz.text = "备注："
        ypbz.numberOfLines = 4
        ypbz.textColor = UIColor.init(lgf_HexString: "8D969D")
        ypbz.font = UIFont.systemFont(ofSize: 12)
        zzysscjl_v.addSubview(ypbz)
        ypbz.snp.makeConstraints { (make) in
            make.top.equalTo(ypqk_l.snp.bottom).offset(15)
            make.width.equalToSuperview().offset(-20)
            make.centerX.equalToSuperview()
        }
        
        zzysscjl_b_v = UIView.init()
        zzysscjl_b_v.backgroundColor = UIColor.white
        zzysscjl_sv.addSubview(zzysscjl_b_v)
        zzysscjl_b_v.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }
        let zzysscjl_b = UILabel.init()
        zzysscjl_b.isUserInteractionEnabled = true
        zzysscjl_b.layer.cornerRadius = 4
        zzysscjl_b.clipsToBounds = true
        zzysscjl_b.text = "填写主诊医生筛查结论"
        zzysscjl_b.textColor = UIColor.white
        zzysscjl_b.backgroundColor = UIColor.init(lgf_HexString: "0F88F2")
        zzysscjl_b.font = UIFont.systemFont(ofSize: 13)
        zzysscjl_b.textAlignment = .center
        zzysscjl_b.lgf_AddTap(target: self, action: #selector(ScxqVC.s_txzzysscjl))
        zzysscjl_b_v.addSubview(zzysscjl_b)
        zzysscjl_b.snp.makeConstraints { (make) in
            make.center.equalToSuperview()
            make.width.equalToSuperview().multipliedBy(0.7)
            make.height.equalTo(50)
        }
        
        scrollView.lgf_AutoContentSize(40)
    }
    
}
